﻿using LNet;
using OestsCommon.Model;
using OestsDataBase;
using OestsServer.Net;
using System.Collections.Generic;

namespace OestsServer.Handlers.OESPHandlers
{

    public class TrainDataTableHandler : HandlerBase<OESPClientChannel>
    {
        public override PacketKey PKey => PacketKey.TrainDataTable;

        public override void Execute(OESPClientChannel client, Request requestPacket)
        {
            base.Execute(client, requestPacket);

            List<TrainData> data = TrainDAL.GetData();

            ResponsePacket.DataObject = data;
            client.Send(ResponsePacket);
        }
    }

}
